import { http } from "@/utils/http";
import type { PageResponse } from "@/types";
import type { ChannelRechargeOrdersInfoData } from "@/api/OrderList";

/** 用户财务信息 */
export function userFinanceInfo(data?: object): Promise<UserFinanceInfoData> {
  return http.request({
    url: "/userFinance/info",
    method: "post",
    data
  });
}
/** 用户财务信息 */
export interface UserFinanceInfoData {
  balanceMoney: number;
  commonDistType: number;
  freezeMoney: number;
  isAgent: number;
  todayMoney: number;
  totalMoney: number;
  userPurchase: number;
  withdrawMoney: number;
  withdrawingMoney: number;
}
/** 用户财务信息 */
export function getCheckStatus(data?: object): Promise<number> {
  return http.request({
    url: "/action/common/checkStatus",
    method: "post",
    data
  });
}
/** 获取视频号带货列表 */
export function getWxShopItemList(
  data?: object
): Promise<PageResponse<WxShopItemInfoData>> {
  return http.request({
    url: "/wxShopAgent/getWxShopItemList",
    method: "post",
    data
  });
}
/** 视频号带货信息 */
export interface WxShopItemInfoData {
  headImg: string;
  title: string;
  salePrice: number;
  commissionPrice: number;
  status: number;
  id: string;
}
